#pragma once
/******************************************************************************
*
*							Listener
*
*******************************************************************************
*
*					Written By: Steven Bankhead
*
*******************************************************************************
*******************************************************************************
*	Still Missing:
*		AddEventMonitor(char eventNmae[]);
*		bool DeleteEventMonitor(char eventName[]);
*		bool SetName(char listenerName[]);
******************************************************************************/
#include "EventType.h"
#include <list>

#define MAX_LISTENER_NAME_SIZE	32

class Listener
{
public:
	Listener(){};
	~Listener(){};

	//Adds an event to watch
	bool AddEventMonitor(EventType event);
	bool AddEventMonitor(char eventName[]);

	//Handles the event
	bool HandleEvent(EventType event);

	//Deletes an event from being watched
	bool DeleteEventMonitor(EventType event);
	bool DeleteEventMonitor(char eventName[]);

	bool ValidateEvent(EventType event);
	bool ValidateEvent(char eventName[]);

	//Check for duplicate entries
	//Returns -1 for not found else the location in the list of the found match
	bool SearchEventMonitor(EventType event);

	char *GetName();
	bool SetName(char listenerName[]);
private:
	std::list<EventType> EventMonitor;
	char name[MAX_LISTENER_NAME_SIZE];
};